<?php
/*************************************************

Encipher - the PHP code encode tool
Author: Jacky Yu <jacky325@qq.com>
Copyright (c): 2012-2017 Jacky Yu, All rights reserved
Version: 1.1.2

* This library is free software; you can redistribute it and/or modify it.
* You may contact the author of Encipher by e-mail at: jacky325@qq.com

The latest version of Encipher can be obtained from:
https://github.com/uniqid/encipher

*************************************************/

    require    '../lib/encryption.php';
    require   '../common/helper.php';

    if($_POST){
        $path = isset($_POST['path'])?$_POST['path']:"";
        if(empty($path)){
            echo "请填写path"; die;
        }
        if(!file_exists($path)){
            echo "文件或路径不正确"; die;
        }

        $path = str_replace("\\","/",$path);
        $encipher = new Encryption($path);
        /**
         * 设置加密模式 false = 低级模式; true = 高级模式
         * 低级模式不使用eval函数
         * 高级模式使用了eval函数
         */


        echo "<pre>\n";
        $encipher->encode();
        echo "</pre>\n";
    }else{
        header("location: ../index.html");
    }


